package com.huawei.hms.common.a;

import android.database.AbstractWindowedCursor;
import android.database.CrossProcessCursor;
import android.database.Cursor;
import android.database.CursorWindow;
import android.database.CursorWrapper;
import com.huawei.hwid.core.constants.HwAccountConstants;

public class a extends CursorWrapper implements CrossProcessCursor {
    private AbstractWindowedCursor a;

    public a(Cursor cursor) {
        super(cursor);
        Object obj = null;
        if (cursor != null && (cursor instanceof CursorWrapper)) {
            obj = ((CursorWrapper) cursor).getWrappedCursor();
        }
        if (obj == null || !(obj instanceof AbstractWindowedCursor)) {
            String name;
            String str = "Unknown type: ";
            if (obj != null) {
                name = obj.getClass().getName();
            } else {
                name = HwAccountConstants.NULL;
            }
            if (name.length() != 0) {
                name = str.concat(name);
            } else {
                name = str;
            }
            throw new IllegalArgumentException(name);
        }
        this.a = (AbstractWindowedCursor) obj;
    }

    public CursorWindow getWindow() {
        return this.a.getWindow();
    }

    public void a(CursorWindow cursorWindow) {
        this.a.setWindow(cursorWindow);
    }

    public void fillWindow(int i, CursorWindow cursorWindow) {
        this.a.fillWindow(i, cursorWindow);
    }

    public boolean onMove(int i, int i2) {
        return this.a.onMove(i, i2);
    }

    public Cursor getWrappedCursor() {
        return this.a;
    }
}
